﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VRacer
{
    /// <summary>
    /// Rozgrywka w trybie praktyki. Nie mozna wygrac, tylko jeden gracz - nieskonczona zabawa.
    /// Nadpisuje wiele metod z rodziny HandlePlayer[Sytuacja]() zapewniajac porady i nieskonczona zabawe.
    /// </summary>
    public class PracticeGame : LocalGame
    {
        public PracticeGame()
        {
            this.Add(new NoobPlayer(this) { Title = "Noob" });
        }

        public override void Initialize()
        {
            this.Laps = Int32.MaxValue;
            base.Initialize();
        }

        protected override bool HandlePlayerCollision(PlayerBase uderzajacy, PlayerBase uderzony, System.Windows.Point collisionPoint)
        {
            OnMessage(new Message("Game", "Jakis nieudacznik w ciebie walnal..\n nastepnym razem nie blokuj drogi\n szybszym kierowcom"));
            return base.HandlePlayerCollision(uderzajacy, uderzony, collisionPoint);
        }

        protected override bool HandlePlayerCrashed(PlayerBase player, System.Windows.Point crashPoint, System.Windows.Point destinationPoint)
        {
            OnMessage(new Message("Game", "Ojejku jej..\n Rozbiłeś swoje piękne auto!\n Musisz poczekać aż Twoi mehcanicy\n dokonaja napraw"));
            return base.HandlePlayerCrashed(player, crashPoint, destinationPoint);
        }

        protected override bool HandlePlayerNotEnoughtMoves(PlayerBase player, System.Windows.Point destinationPoint)
        {
            OnMessage(new Message("Game", "Och nie!\n brakuje juz ci ruchow ;("));
            return base.HandlePlayerNotEnoughtMoves(player, destinationPoint);
        }

        protected override bool HandlePlayerNotEnoughtSpeed(PlayerBase player, System.Windows.Point destinationPoint)
        {
            OnMessage(new Message("Game", "Ojej jak strasznie\n nie masz wystarczajacego speeda ;(\n Musisz się bardziej rozpędzić"));
            return base.HandlePlayerNotEnoughtSpeed(player, destinationPoint);
        }

        protected override bool HandlePlayerCrossedFinish(PlayerBase player, System.Windows.Point finishPoint, System.Windows.Point destinationPoint)
        {
            return base.HandlePlayerCrossedFinish(player, finishPoint, destinationPoint);
        }

        protected override bool HandlePlayerCrossedStart(PlayerBase player, System.Windows.Point finishPoint, System.Windows.Point destinationPoint)
        {
            return base.HandlePlayerCrossedStart(player, finishPoint, destinationPoint);
        }
    }

}
